package org.haikuos.haikudepotserver.dataobjects.auto;

import java.util.Date;
import java.util.List;

import org.haikuos.haikudepotserver.dataobjects.Architecture;
import org.haikuos.haikudepotserver.dataobjects.Pkg;
import org.haikuos.haikudepotserver.dataobjects.PkgVersionCopyright;
import org.haikuos.haikudepotserver.dataobjects.PkgVersionLicense;
import org.haikuos.haikudepotserver.dataobjects.PkgVersionLocalization;
import org.haikuos.haikudepotserver.dataobjects.PkgVersionUrl;
import org.haikuos.haikudepotserver.dataobjects.Repository;
import org.haikuos.haikudepotserver.dataobjects.support.AbstractDataObject;

/**
 * Class _PkgVersion was generated by Cayenne.
 * It is probably a good idea to avoid changing this class manually,
 * since it may be overwritten next time code is regenerated.
 * If you need to make any customizations, please use subclass.
 */
public abstract class _PkgVersion extends AbstractDataObject {

    public static final String ACTIVE_PROPERTY = "active";
    public static final String CREATE_TIMESTAMP_PROPERTY = "createTimestamp";
    public static final String IS_LATEST_PROPERTY = "isLatest";
    public static final String MAJOR_PROPERTY = "major";
    public static final String MICRO_PROPERTY = "micro";
    public static final String MINOR_PROPERTY = "minor";
    public static final String MODIFY_TIMESTAMP_PROPERTY = "modifyTimestamp";
    public static final String PAYLOAD_LENGTH_PROPERTY = "payloadLength";
    public static final String PRE_RELEASE_PROPERTY = "preRelease";
    public static final String REVISION_PROPERTY = "revision";
    public static final String VIEW_COUNTER_PROPERTY = "viewCounter";
    public static final String ARCHITECTURE_PROPERTY = "architecture";
    public static final String PKG_PROPERTY = "pkg";
    public static final String PKG_VERSION_COPYRIGHTS_PROPERTY = "pkgVersionCopyrights";
    public static final String PKG_VERSION_LICENSES_PROPERTY = "pkgVersionLicenses";
    public static final String PKG_VERSION_LOCALIZATIONS_PROPERTY = "pkgVersionLocalizations";
    public static final String PKG_VERSION_URLS_PROPERTY = "pkgVersionUrls";
    public static final String REPOSITORY_PROPERTY = "repository";

    public static final String ID_PK_COLUMN = "id";

    public void setActive(Boolean active) {
        writeProperty(ACTIVE_PROPERTY, active);
    }
    public Boolean getActive() {
        return (Boolean)readProperty(ACTIVE_PROPERTY);
    }

    public void setCreateTimestamp(Date createTimestamp) {
        writeProperty(CREATE_TIMESTAMP_PROPERTY, createTimestamp);
    }
    public Date getCreateTimestamp() {
        return (Date)readProperty(CREATE_TIMESTAMP_PROPERTY);
    }

    public void setIsLatest(Boolean isLatest) {
        writeProperty(IS_LATEST_PROPERTY, isLatest);
    }
    public Boolean getIsLatest() {
        return (Boolean)readProperty(IS_LATEST_PROPERTY);
    }

    public void setMajor(String major) {
        writeProperty(MAJOR_PROPERTY, major);
    }
    public String getMajor() {
        return (String)readProperty(MAJOR_PROPERTY);
    }

    public void setMicro(String micro) {
        writeProperty(MICRO_PROPERTY, micro);
    }
    public String getMicro() {
        return (String)readProperty(MICRO_PROPERTY);
    }

    public void setMinor(String minor) {
        writeProperty(MINOR_PROPERTY, minor);
    }
    public String getMinor() {
        return (String)readProperty(MINOR_PROPERTY);
    }

    public void setModifyTimestamp(Date modifyTimestamp) {
        writeProperty(MODIFY_TIMESTAMP_PROPERTY, modifyTimestamp);
    }
    public Date getModifyTimestamp() {
        return (Date)readProperty(MODIFY_TIMESTAMP_PROPERTY);
    }

    public void setPayloadLength(Long payloadLength) {
        writeProperty(PAYLOAD_LENGTH_PROPERTY, payloadLength);
    }
    public Long getPayloadLength() {
        return (Long)readProperty(PAYLOAD_LENGTH_PROPERTY);
    }

    public void setPreRelease(String preRelease) {
        writeProperty(PRE_RELEASE_PROPERTY, preRelease);
    }
    public String getPreRelease() {
        return (String)readProperty(PRE_RELEASE_PROPERTY);
    }

    public void setRevision(Integer revision) {
        writeProperty(REVISION_PROPERTY, revision);
    }
    public Integer getRevision() {
        return (Integer)readProperty(REVISION_PROPERTY);
    }

    public void setViewCounter(Long viewCounter) {
        writeProperty(VIEW_COUNTER_PROPERTY, viewCounter);
    }
    public Long getViewCounter() {
        return (Long)readProperty(VIEW_COUNTER_PROPERTY);
    }

    public void setArchitecture(Architecture architecture) {
        setToOneTarget(ARCHITECTURE_PROPERTY, architecture, true);
    }

    public Architecture getArchitecture() {
        return (Architecture)readProperty(ARCHITECTURE_PROPERTY);
    }


    public void setPkg(Pkg pkg) {
        setToOneTarget(PKG_PROPERTY, pkg, true);
    }

    public Pkg getPkg() {
        return (Pkg)readProperty(PKG_PROPERTY);
    }


    public void addToPkgVersionCopyrights(PkgVersionCopyright obj) {
        addToManyTarget(PKG_VERSION_COPYRIGHTS_PROPERTY, obj, true);
    }
    public void removeFromPkgVersionCopyrights(PkgVersionCopyright obj) {
        removeToManyTarget(PKG_VERSION_COPYRIGHTS_PROPERTY, obj, true);
    }
    @SuppressWarnings("unchecked")
    public List<PkgVersionCopyright> getPkgVersionCopyrights() {
        return (List<PkgVersionCopyright>)readProperty(PKG_VERSION_COPYRIGHTS_PROPERTY);
    }


    public void addToPkgVersionLicenses(PkgVersionLicense obj) {
        addToManyTarget(PKG_VERSION_LICENSES_PROPERTY, obj, true);
    }
    public void removeFromPkgVersionLicenses(PkgVersionLicense obj) {
        removeToManyTarget(PKG_VERSION_LICENSES_PROPERTY, obj, true);
    }
    @SuppressWarnings("unchecked")
    public List<PkgVersionLicense> getPkgVersionLicenses() {
        return (List<PkgVersionLicense>)readProperty(PKG_VERSION_LICENSES_PROPERTY);
    }


    public void addToPkgVersionLocalizations(PkgVersionLocalization obj) {
        addToManyTarget(PKG_VERSION_LOCALIZATIONS_PROPERTY, obj, true);
    }
    public void removeFromPkgVersionLocalizations(PkgVersionLocalization obj) {
        removeToManyTarget(PKG_VERSION_LOCALIZATIONS_PROPERTY, obj, true);
    }
    @SuppressWarnings("unchecked")
    public List<PkgVersionLocalization> getPkgVersionLocalizations() {
        return (List<PkgVersionLocalization>)readProperty(PKG_VERSION_LOCALIZATIONS_PROPERTY);
    }


    public void addToPkgVersionUrls(PkgVersionUrl obj) {
        addToManyTarget(PKG_VERSION_URLS_PROPERTY, obj, true);
    }
    public void removeFromPkgVersionUrls(PkgVersionUrl obj) {
        removeToManyTarget(PKG_VERSION_URLS_PROPERTY, obj, true);
    }
    @SuppressWarnings("unchecked")
    public List<PkgVersionUrl> getPkgVersionUrls() {
        return (List<PkgVersionUrl>)readProperty(PKG_VERSION_URLS_PROPERTY);
    }


    public void setRepository(Repository repository) {
        setToOneTarget(REPOSITORY_PROPERTY, repository, true);
    }

    public Repository getRepository() {
        return (Repository)readProperty(REPOSITORY_PROPERTY);
    }


}
